/**
 * Copyright &copy; 2012-2016 <a href="https://istep.lczyfz.com">Istep</a> All rights reserved.
 */
package com.lczyfz.istep.modules.scene.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lczyfz.istep.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.util.Date;
import java.util.List;

/**
 * 教学实验环境实例Entity
 * @author dh
 * @version 2017-04-11
 */
public class SceneEnvironmentInstance extends DataEntity<SceneEnvironmentInstance> {
	
	private static final long serialVersionUID = 1L;
	private String environmentId;		// 教学实验环境id
	private Date endDate;		// 创建时间
	private String url;		// 控制台url
	private String type;		// 控制台类型
	private Date beginEndDate;		// 开始 创建时间
	private Date endEndDate;		// 结束 创建时间
	private String autoDelete;//实例是否自动删除
	private String coursewareId;//课件id
	private String environmentName;		// 教学实验环境名称
	private String environmentTime;		// 实验时间
	private String vmTemplateName;// 虚拟机模板名称
	private String vmTemplateId;// 虚拟机id
	private String vmName;// 虚拟机名称
	private String vmId;
	private String createUserName;//实例创建者

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	public String getVmId() {
		return vmId;
	}

	public void setVmId(String vmId) {
		this.vmId = vmId;
	}

	public String getVmName() {
		return vmName;
	}

	public void setVmName(String vmName) {
		this.vmName = vmName;
	}

	public String getVmTemplateId() {
		return vmTemplateId;
	}

	public void setVmTemplateId(String vmTemplateId) {
		this.vmTemplateId = vmTemplateId;
	}

	public String getCoursewareId() {
		return coursewareId;
	}

	public void setCoursewareId(String coursewareId) {
		this.coursewareId = coursewareId;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getAutoDelete() {
		return autoDelete;
	}

	public void setAutoDelete(String autoDelete) {
		this.autoDelete = autoDelete;
	}

	private List<SceneEnvironmentInstanceOs> instanceOsList;

	public List<SceneEnvironmentInstanceOs> getInstanceOsList() {
		return instanceOsList;
	}

	public void setInstanceOsList(List<SceneEnvironmentInstanceOs> instanceOsList) {
		this.instanceOsList = instanceOsList;
	}

	public SceneEnvironmentInstance() {
		super();
	}

	public SceneEnvironmentInstance(String id){
		super(id);
	}

	@Length(min=0, max=64, message="教学实验环境id长度必须介于 0 和 64 之间")
	public String getEnvironmentId() {
		return environmentId;
	}

	public void setEnvironmentId(String environmentId) {
		this.environmentId = environmentId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Length(min=0, max=255, message="控制台url长度必须介于 0 和 255 之间")
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	@Length(min=0, max=16, message="控制台类型长度必须介于 0 和 16 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	public Date getBeginEndDate() {
		return beginEndDate;
	}

	public void setBeginEndDate(Date beginEndDate) {
		this.beginEndDate = beginEndDate;
	}
	
	public Date getEndEndDate() {
		return endEndDate;
	}

	public void setEndEndDate(Date endEndDate) {
		this.endEndDate = endEndDate;
	}

	public String getEnvironmentName() {
		return environmentName;
	}

	public void setEnvironmentName(String environmentName) {
		this.environmentName = environmentName;
	}

	public String getEnvironmentTime() {
		return environmentTime;
	}

	public void setEnvironmentTime(String environmentTime) {
		this.environmentTime = environmentTime;
	}

	public String getVmTemplateName() {
		return vmTemplateName;
	}

	public void setVmTemplateName(String vmTemplateName) {
		this.vmTemplateName = vmTemplateName;
	}
}